<?php $this->_extends('_layouts/default_layout'); ?>
 
<?php $this->_block('contents'); ?>

<span><a href="<?php echo url('user/GetAllmembers'); ?>">企业用户</a> | <a href="<?php echo url('user/GetOnlineUser'); ?>">在线用户</a> | <a href="<?php echo url('user/GetTopUser'); ?>">热门用户</a></span>

<table cellpadding="0" cellspacing="0" width="100%">
	<tbody class="">
		<tr class="tth">
		<td width="30%">用户名</td>
		<td width="*">用户登录次数</td>
		<td width="*"></td>
	<?php foreach ($users as $user): ?>		
		</tr>
			<tr>
			<td width="30%"><?php echo $user->username ?></td>
			<td width="30%"><?php echo $user->login_count ?>次</td>
            <td width="*"></td>
		</tr>
	<?php endforeach; ?>	
	
	</tr>

	</tbody>
	</table>
</form>
<script>
	function SelectAll() {
	 var flg=0;
	 var checkboxs=document.getElementsByName("checkboxid[]");
	 var count=0;
	 for (var j=0; j<checkboxs.length; j++)
	 {
		var e=checkboxs[j];
		if(e.checked)count++;
	 }
	 if(count < checkboxs.length)
	 {
		 for (var i=0;i<checkboxs.length;i++) {
			 var e=checkboxs[i];
			 e.checked =1;
			 flg= true;
		 }
	 }
	 else 
	 {
		 for (var i=0;i<checkboxs.length;i++) {
			 var e=checkboxs[i];
			 e.checked =0;
			 flg= false;
		 }

	 }

	 if (flg)
	 {
		document.mainform.choseall.value = "取消";
	 }
	 else
	 {
		document.mainform.choseall.value = "全选";
	 }

	}

	function CheckFirst()
	{
	    var count=0;
        var checkboxs=document.getElementsByName("checkboxid[]");
	    for (var i=0;i<checkboxs.length;i++)
		{
		    var e=checkboxs[i];
		    if(e.checked)count++;
	    }
        if(count == 0)
		{
			alert('请先选择删除条目'); 
			return false;
		}
		else
		{
            if(!confirm('您确认要删除吗?')) 
                return false;
            else
                return true; 
		}
	}
</script>
<?php $this->_control('pagination', 'my-pagination', array('pagination' => $pagination)); ?>

<?php $this->_endblock(); ?>
